---
title: Forbidden rewrite to a static route.
i18nReady: true
githubURL: https://github.com/withastro/astro/blob/main/packages/astro/src/core/errors/errors-data.ts
---

> **ForbiddenRewrite**: You tried to rewrite the on-demand route 'FROM' with the static route 'TO', when using the 'server' output. <br/><br/>The static route 'TO' is rendered by the component
'COMPONENT', which is marked as prerendered. This is a forbidden operation because during the build the component 'COMPONENT' is compiled to an
HTML file, which can't be retrieved at runtime by Astro.

## 무엇이 잘못되었나요?
`Astro.rewrite()`는 `"server"` 출력을 사용할 때 요청 시 렌더링되는 라우트를 정적 경로로 리라이트하는 데 사용할 수 없습니다.
